import Vue from 'vue'
import App from './App'
import store from './store/index.js'
import {myRequest} from './util/api.js'

Vue.prototype.$store = store
Vue.prototype.$myRequest = myRequest
Vue.filter("formatDate",(date)=>{
	let newDate = new Date(date)
	let year = String(newDate.getFullYear()).padStart(2, 0)
	let month = String(newDate.getMonth() + 1).padStart(2, 0)
	let day = String(newDate.getDate()).padStart(2, 0)
	return year + "-" + month + "-" + day
})

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	store,
    ...App
})
app.$mount()
